﻿using System.ComponentModel;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SX.BaseService.API.Base;
using SX.BaseService.Service;
using SX.Core;
using SX.Core.Attributes;

namespace SX.BaseService.API
{
   
    [Description("系统配置")]
    [Menu]
    public class SysConfigController : BaseController
    {
        private ISysConfigService _service;
        public SysConfigController(ISysConfigService sysConfigService)
        {
            _service = sysConfigService;
        }
        /// <summary>
        /// 设置
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [Description("新增")]
        public async Task<IApiResult> Add([FromForm] ConfigAddModel model)
        {
            return await _service.Add(model);
        }
     
        [HttpGet]
        [Common]
        [Description("查询")]
        public async Task<IApiResult> Query()
        {
            return await _service.Query();
        }
    }
}